<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>结算</title>
<link rel="stylesheet"
	href="<%=request.getContextPath()%>/css/style.css" />
<link rel="stylesheet"
	href="<%=request.getContextPath()%>/css/reset.css" />
<link rel="stylesheet" href="<%=request.getContextPath()%>/css/main.css" />
<link rel="stylesheet"
	href="<%=request.getContextPath()%>/css/table.css" />
<script src="<%=request.getContextPath() %>/js/jquery-1.4.2.min.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/js/sendCartAjax.js" ></script>
<%
	String username = (String) request.getSession()
			.getAttribute("user");
%>
</head>


<body>
	<div class="head">
		<div class="top-first">
			<div class="comWidth">
				<div class="leftArea">
					<a href="#" class="collection">商城首页</a>
				</div>
				<div class="rightArea welcome">
					<span>欢迎您来到数码商城！</span>
					<%
						if (username == null) {
					%>
					<a href="<%=request.getContextPath()%>/login/index">[登录]</a>
					<%
						} else {
					%>
					<label><%=username%></label>
					<%
						}
					%>
					<a href="<%=request.getContextPath()%>/login/register">[注册]</a>
				</div>
			</div>
		</div>
		<div class="top-second">
			<div class="comWidth">
				<div class="logo fl" style="margin-left: -20px;">
					<a href="#"><img
						src="<%=request.getContextPath()%>/img/logo.png" /></a>
				</div>
				<div class="step fl"></div>
			</div>
		</div>
		<div class="top-third">
			<div class="comWidth"></div>
		</div>
	</div>

	<div class="shoppingCart">
		<div class="shopping_item">
			<h3 class="shopping_tit">收货地址</h3>
			<div class="shopping_cont padding_shopping">
				<ul class="shopping_list">
					<li><span class="shopping_list_text"><em>*</em>详细地址：</span> <input
						type="text" name="province" class="input input1" />省 <input type="text"
						name="city" class="input input1" />市 <input type="text" name="detailAddress"
						class="input input2" /></li>
					<li><span class="shopping_list_text"><em>*</em>收货人：</span> <input
						type="text" placeholder="最多输入10个汉字" class="input " name="receiver"></li>
					<li><span class="shopping_list_text"><em>*</em>收货人电话：</span> <input
						type="text" placeholder="如：18818429731" class="input" name="receiverPhone"></li>
					
				</ul>
			</div>

		</div>
	</div>

	<div class="shoppingCart">
		<div class="shopping_item">
			<h3 class="shopping_tit">
				送货清单<a href="<%=request.getContextPath()%>/shoppingCart/showGoods" class="backCar">返加购物车修改</a>
			</h3>
			<div style="display: block;">
				<form action="#" method="post">
					<table class="table table-hover text-center" style="width: 100%;">
						<tr>
							<th width="40%">商品</th>
							<th width="10%">单价</th>
							<th width="10%">数量</th>
							<th width="10%">小计</th>
						</tr>
						<c:forEach items="${lists }" var="list">
							<tr style="height: 114px;">
								<td><img class="imgShoppingCart" src="<%=request.getContextPath()%>/${list.Pimg}" />
									${list.pName }【${list.Ram }+${list.Rom }B】 ${list.Color } ${pDesc }</td>
								<td class="price-color">${list.iPrice }</td>
								<td>${list.num }</td>
								<td class="price-color">${list.iPrice*list.num }</td>
							</tr>
						</c:forEach>
					</table>
				</form>
				<div class="panel panel-default floatPanel" style="background-color:#E9E9E9; color:red; margin-left:440px; margin-top:-300px; position: absolute;  display: none;" >
				<div class="panel-body" style="height: 120px; width: 391px;">
					<div id="Canvas" class="Canvas" style="text-align: center; padding-top: 60px;">
					</div>
				</div>
			</div>
		</div>
	</div>

	<div class="shoppingCart">
		<div class="shopping_item">
			<h3 class="shopping_tit">订单结算</h3>
			<div class="shopping_cont padding_shopping clearfix">
				<div class="shopping_cont_result">
					<a class="total">总计： 
						<em class="value">
							<c:set value="0" var="sum" />
							<c:set value="0" var="totalSum" />
							<c:forEach  items="${lists }" var="list">
							<c:set value="${list.iPrice*list.num }" var="sum"/>
							<c:set value="${sum+totalSum }" var="totalSum" />
							</c:forEach>
							￥<span id="totalSum">${totalSum }</span>
						</em>
					</a> <a class="send-button send-btn" href="javascript:void(0)"
						onclick="submitOrder()"> 提交订单 </a>
				</div>
			</div>

		</div>
	</div>


	<br />
	<br />


	<div class="comWidth">
		<img src="<%=request.getContextPath()%>/img/foot.png"
			style="width: 1211px;" />
	</div>

	<div class="footbar">
		<div id="web_wj">
			<p>制作团队：ELEMENT TEAM</p>
			<p>
				Copyright &#169;2016-2017 <a title="数码商城" href="#">www.DM.com</a>
				All Rights Reserved <a title="船舶网" href="#">数码商城</a> 版权所有
			</p>
		</div>
	</div>
</body>

</html>